package com.myBase.core.facade.service;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.myBase.core.base.entity.PageVo;
import com.myBase.core.entity.GoldCoinSettlementReq;
import com.myBase.core.entity.GoldcoinTradeRecord;
import com.myBase.common.persistence.Page;

public interface GoldcoinTradeRecordServiceFacade {
    public GoldcoinTradeRecord get(String id);

    public List<GoldcoinTradeRecord> findList(GoldcoinTradeRecord goldcoinTradeRecord);

    public Page<GoldcoinTradeRecord> findPage(Page<GoldcoinTradeRecord> page, GoldcoinTradeRecord goldcoinTradeRecord);

    public void save(GoldcoinTradeRecord goldcoinTradeRecord);

    public void delete(GoldcoinTradeRecord goldcoinTradeRecord);

    /**
     * * getGoldRecordList(查询用户金币流水 领取，使用，过期) 
     * @param   GoldcoinTradeRecord
     * @return   pageVo
     */
    public PageVo<HashMap<String, Object>> getGoldRecordList(PageVo<HashMap<String, Object>> page,
            GoldcoinTradeRecord goldRecord) throws Exception;

    /**
     * * getGoldRecordSum(营销 活动资金   查询发出,使用,过期金币) 
     * @param   activityId
     * @return  HashMap<String, Integer>
     * @Exception 异常对象    
     */
    public HashMap<String, Object> getGoldRecordSum(int activityId) throws Exception;

    /**
     * * getGoldRecordSumByUserId(pc 我的金币  查询已使用，已过期金币) 
     * @param   GoldcoinTradeRecord
     * @return  HashMap   
     * @Exception 异常对象    
     */
    public HashMap<String, Object> getGoldRecordSumByUserId(GoldcoinTradeRecord goldRecord) throws Exception;

    /**
     * 搜索指定活动，指定日期的金币
     * @param goldCoinSettlementReq
     * @return
     */
    public ArrayList<Map<String, Object>> getGoldCoinActivityCoinSumByDate(GoldCoinSettlementReq goldCoinSettlementReq);


    /**
     *findUserGoldGainList(用户金币领取查询) 
     */
    public Page<GoldcoinTradeRecord> findUserGoldGainList(Page<GoldcoinTradeRecord> page,
            GoldcoinTradeRecord goldRecord) throws Exception;

    /**
     *findUserGoldOverdueList(用户金币过期查询) 
     */
    public Page<GoldcoinTradeRecord> findUserGoldOverdueList(Page<GoldcoinTradeRecord> page,
            GoldcoinTradeRecord goldRecord) throws Exception;

    /**
     *getUserGoldCount(用户金币过期查询,查询总人数,金币总数量，根据设备分组数量) 
     */
    public List<HashMap<String, Object>> getUserGoldCount(GoldcoinTradeRecord goldRecord) throws Exception;

    
    /**
     * 获取指定日期有金币发放记录的金币活动list列表
     * @param brancheId 平台 易贷，转赚
     * @param date yyyy-MM-dd
     * @return
     */
    public ArrayList<String> getGoldCoinActivityIdListByDate(String brancheId,Date date);
    
    /**
     * 获取指定用户（accountid）和指定领取金币批次（detailid）且是发放金币的 GoldcoinTradeRecord 数据实体list
     */
    public ArrayList<GoldcoinTradeRecord> getBeanListByDetailIdAccountIdSend(String accountId,String detailId);

}
